home *** CD-ROM | disk | FTP | other *** search
/ Ray Dream Studio 5 / Ray Dream.iso / pc / DreamSDK / Windows / INCLUDES / I3DEX.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-11  |  5.4 KB  |  126 lines

  1. /* $Id: I3DEX.H 1.5 1997/04/30 00:46:16 damien Exp $ */
  2. /*****************************************************************************\
  3. *                                                                             *
  4. * I3DEx.h                                                                                    *
  5. *   I3DExtension definition                                                   *
  6. *   I3DExDataExchanger definition                                             *
  7. *                                                                             *
  8. *           Copyright (c) 1995, Ray Dream, Inc. All rights reserved.          *
  9. *                                                                             *
  10. \*****************************************************************************/
  11.  
  12. #ifndef __I3DEX__
  13. #define __I3DEX__
  14.  
  15. #ifndef __3DCOTYPE__
  16. #include "3DCoType.h"
  17. #endif
  18.  
  19. struct IShUtilities;
  20. struct IShView;
  21.  
  22. //****** Globally Unique Ids **************************************************
  23.  
  24. DEFINE_GUID(IID_I3DExtension, 0xB0210D00L, 0x3A02, 0x101C, 0x88, 0x5F, 0x04, 0x02, 0x1C, 0x00, 0x70, 0x02);
  25. DEFINE_GUID(IID_I3DExDataExchanger, 0xB295B680L, 0x3A02, 0x101C, 0x88, 0x5F, 0x04, 0x02, 0x1C, 0x00, 0x70, 0x02);
  26. DEFINE_GUID(IID_I3DExDataExchanger9, 0x09608D40L, 0xC09F, 0x11D0, 0x94, 0xE5, 0x00, 0x00, 0xC0, 0xE4, 0x45, 0x87);
  27.  
  28. DEFINE_GUID(IID_I3DNamedExtension, 0xb80fa570, 0xb2c8, 0x11d0, 0x85, 0x3e, 0x0, 0xa0, 0xc9, 0xc, 0x1b, 0xf1);
  29.  
  30.  
  31. /*****************************************************************************\
  32. *  I3DExtension                                                               *
  33. *                                                                             *
  34. *  Contains utility methods that are complements to IUnkown, like Clone()     *
  35. *                                                                             *
  36. *                                                                             *
  37. \*****************************************************************************/
  38.  
  39. #undef  INTERFACE
  40. #define INTERFACE   I3DExtension
  41.  
  42. DECLARE_INTERFACE_(I3DExtension, IUnknown) {
  43.     // IUnknown methods
  44.   STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  45.   STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  46.   STDMETHOD_(ULONG, Release) (THIS) PURE;
  47.  
  48.     // I3DExtension methods
  49.     STDMETHOD(ShellUtilitiesInit) (THIS_ IShUtilities* shellUtilities) PURE;
  50.     STDMETHOD_(I3DExtension*, Clone) (THIS) PURE;
  51.     };
  52.  
  53. //******************************************
  54.  
  55. //enables an extension to do some file handling on its own (gives a starting point for folder scans etc.)
  56. DECLARE_INTERFACE_(I3DNamedExtension, IUnknown) {
  57.     STDMETHOD(SetExtensionFullPathName) (const char *fullPathName) PURE;
  58.     };
  59.  
  60. /*****************************************************************************\
  61. *  I3DExDataExchanger                                                         *
  62. *                                                                             *
  63. *  Allows the Shell to handle the UI of the 3D Component and the              *
  64. *  Component's public data.                                                   *
  65. *  Handles the communication between the 3D Component and the Shell           *
  66. *                                                                             *
  67. *  All other I3DEx... interfaces inherit from this one                        *
  68. *                                                                             *
  69. \*****************************************************************************/
  70.  
  71. typedef struct ExtensionData {
  72.     ULONG        fType;
  73.     ULONG        fID;
  74.     } ExtensionData;
  75.  
  76. typedef struct ExtensionDataMap {
  77.     short                    fNbExtensionData;            // Number of ExtensionData
  78.     ExtensionData    fExtensionData[1];        // Array with fNbExtensionData entries
  79.     } ExtensionDataMap;
  80.  
  81.  
  82. #undef  INTERFACE
  83. #define INTERFACE   I3DExDataExchanger
  84.  
  85. DECLARE_INTERFACE_(I3DExDataExchanger, I3DExtension) {
  86.     // IUnknown methods
  87.   STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  88.   STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  89.   STDMETHOD_(ULONG, Release) (THIS) PURE;
  90.   
  91.     // I3DExtension methods
  92.     STDMETHOD(ShellUtilitiesInit) (THIS_ IShUtilities* shellUtilities) PURE;
  93.     STDMETHOD_(I3DExtension*, Clone) (THIS) PURE;
  94.  
  95.   // I3DExDataExchanger methods
  96.     STDMETHOD_(ExtensionDataMap*, GetExtensionDataMap) (THIS) PURE;    // Return NULL if GetResID is to be used
  97.     STDMETHOD_(void*, GetExtensionDataBuffer) (THIS) PURE;
  98.   STDMETHOD(ExtensionDataChanged) (THIS) PURE;
  99.   STDMETHOD(HandleEvent) (THIS_ ULONG sourceID) PURE;
  100.     STDMETHOD_(short, GetResID) (THIS) PURE;
  101.     };
  102.  
  103. #undef  INTERFACE
  104. #define INTERFACE   I3DExDataExchanger9
  105.  
  106. DECLARE_INTERFACE_(I3DExDataExchanger9, I3DExtension) {
  107.     // IUnknown methods
  108.   STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  109.   STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  110.   STDMETHOD_(ULONG, Release) (THIS) PURE;
  111.   
  112.     // I3DExtension methods
  113.     STDMETHOD(ShellUtilitiesInit) (THIS_ IShUtilities* shellUtilities) PURE;
  114.     STDMETHOD_(I3DExtension*, Clone) (THIS) PURE;
  115.  
  116.   // I3DExDataExchanger methods
  117.     STDMETHOD_(ExtensionDataMap*, GetExtensionDataMap) (THIS) PURE;    // Return NULL if GetResID is to be used
  118.     STDMETHOD_(void*, GetExtensionDataBuffer) (THIS) PURE;
  119.   STDMETHOD(ExtensionDataChanged) (THIS) PURE;
  120.   STDMETHOD(HandleEvent) (THIS_ ULONG sourceID, IShView* view, ULONG message) PURE;
  121.     STDMETHOD_(short, GetResID) (THIS) PURE;
  122.     };
  123.  
  124. #endif
  125.  
  126.